package com.brainshare.system.service;

import com.brainshare.system.domain.AnRedPacketRecord;
import com.brainshare.system.domain.vo.AddRedPacketVO;
import com.brainshare.system.domain.vo.AddWithdrawalCardVO;
import com.brainshare.system.domain.vo.RedPacketInfoVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 红包Service接口
 * @author wll
 */
public interface IRedPacketService {
    /**
     * 发红包
     * @param request
     * @param redPacketType
     * @return
     */
    AddRedPacketVO addRedPacket(HttpServletRequest request, Integer redPacketType);

    /**
     * 发红包
     * @param userId
     * @param redPacketType
     * @return
     */
    AddRedPacketVO addRedPacket(Long userId, String phone,Integer redPacketType);

    /**
     * 领红包
     * @param redPacketId 红包编号
     * @return
     */
    Integer receiveRedPacket(HttpServletRequest request, Integer redPacketId);

    /**
     * 领红包
     * @param userId
     * @param redPacketId
     * @return
     */
    Integer receiveRedPacket(Long userId,String phone, Integer redPacketId);

    /**
     * 查询分享次数
     * @param request
     * @return 分享次数
     */
    Integer getShareTime(HttpServletRequest request);

    /**
     * 查询红包记录
     * @param request
     * @param redPacketType
     * @return
     */
    AddRedPacketVO getRedPacketRecord(HttpServletRequest request, Integer redPacketType);

    /**
     * 查询红包
     * @param request
     * @return
     */
    RedPacketInfoVO getRedPacketInfo(HttpServletRequest request);

    /**
     * 新增提现卡
     * @param request
     * @param withdrawalCardType
     * @return
     */
    AddWithdrawalCardVO addWithdrawalCard(HttpServletRequest request, Integer withdrawalCardType);

    /**
     * 更新提现卡状态 （提现成功、提现失败、已失效）
     * @param withdrawalCardId
     * @param withdrawalCardStatus
     * @return
     */
    int updateWithdrawalCard( HttpServletRequest request,Integer withdrawalCardId, Integer withdrawalCardStatus);

    /**
     * 查询提现卡记录
     * @param request
     * @param withdrawalCardType
     * @return
     */
    AddWithdrawalCardVO getWithdrawalCardRecord(HttpServletRequest request, Integer withdrawalCardType);

    /**
     * 添加筛查领红包步骤
     * @param request
     * @return
     */
    int addAnRedPacketStep( HttpServletRequest request,String router);

    /**
     * 查询当前骤
     * @param request
     * @return
     */
    AnRedPacketRecord getCurrentAnRedPacketStep(HttpServletRequest request);

    /**
     * 清理筛查领红包记录
     * @return
     */
    Integer clearAnRedPacketRecord();
}
